package alijk.dataView.services;

import java.util.HashMap;
import java.util.Map;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;

public class QuartzJobOut implements Job{
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		
		Map<String, String> params = new HashMap<String, String>();
		try {
			params = (Map<String, String>) context.getScheduler().getContext().get("params");
		} catch (SchedulerException e1) {
			e1.printStackTrace();
		}
		System.out.println("sql------"+params.get("sql"));
		for(int i=0;i<8;i++){
			System.out.println("######:"+i);
			try {
				Thread.sleep(2000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
//		System.out.println("得到的taskName:"+QuartzTaskUtil.taskMap.get);
		//TODO 更新数据库，处理完成 parmas.get("taskName_id");
	}
	
}
